%% TF曲线提取信噪比测试
clc;
close all;
clearvars;
%% 定义信噪比
SNRList = 0:30;  % 应为一行
%% monte carlo
simuTimes = 20;   % 仿真平均次数
%% 运行测试
snrOspa = zeros(simuTimes,size(SNRList,2),3);

for snrIdx = 1:size(SNRList,2)
    SNR = SNRList(1,snrIdx);
    for simuTime = 1:simuTimes
        outsideRun = true;   % 定义外部运行，不清空变量
        rotorMicroDopProc;   % 运行主程序
        disp(strcat(num2str(snrIdx),',',num2str(simuTime),'/',num2str(size(SNRList,2)),',',num2str(simuTimes)));
        
        snrOspa(simuTime,snrIdx,:) = ospaAvg;
    end
end
%% ospa取平均
snrOspaAvg = squeeze(mean(snrOspa,1));
%% 绘图
f1 = figure;
f1_1 = axes(f1);
plot(f1_1,SNRList,snrOspaAvg(:,1));